﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX;

namespace KinectBender.Shaders
{
    class GPUParticle
    {
        public Vector3 Position; 
        public Vector3 Velocity;
        public Vector3 Acceleration;
        public float Mass;
        public Vector3 Force;
        public float Radius;
        
        public override string ToString()
        {
            return "Position: " + Position.ToString() + ", Velocity: " + Velocity.ToString();
        }

        public void Integrate(float dt)
        {
            Acceleration = Force / Mass;
            Velocity += Acceleration * dt;
            Position += Velocity * dt;
        }

        internal void ApplyForce(Vector3 newForce)
        {
            Force += newForce;
        }
    }

}
